/**
 * API 配置文件
 */

export const API_CONFIG = {
  baseURL: import.meta.env.VITE_API_BASE_URL || 'http://localhost:3001',
  timeout: 10000,
  headers: {
    'Content-Type': 'application/json',
  },
}

export const API_ENDPOINTS = {
  // 员工相关
  employees: '/employees',
  employee: (id: number | string) => `/employees/${id}`,

  // 班次相关
  shifts: '/shifts',
  shift: (id: number | string) => `/shifts/${id}`,
  shiftsByDateRange: (start: string, end: string) => `/shifts?date_gte=${start}&date_lte=${end}`,
  shiftsByEmployee: (employeeId: number | string) => `/shifts?employeeId=${employeeId}`,
} as const
